package com.sas.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sas.dao.UserDao;
import com.sas.entity.User;
import com.sas.service.UserService;



/**
 * 用户基本信息DAO
 * 2017-11-20
 * @author 胡其安
 * 
 */
@Service("userService")
public class UserServiceImpl implements UserService{
	@Autowired
	UserDao userdao;

	@Override
	public User select_user_bypass(User user) throws Exception  {
		// TODO Auto-generated method stub
		return userdao.select_user_bypass(user);
	}

	@Override
	public User select_user_byid(User user) throws Exception {
		// TODO Auto-generated method stub
		return userdao.select_user_byid(user);
	}

	@Override
	public List<User> query_page_user_list(Map user) throws Exception {
		// TODO Auto-generated method stub
		return userdao.query_page_user_list(user);
	}

	@Override
	public int update_user_byid(User user) throws Exception {
		// TODO Auto-generated method stub
		return userdao.update_user_byid(user);
	}

	@Override
	public int insert_user(User user) throws Exception {
		// TODO Auto-generated method stub
		return userdao.insert_user(user);
	}

	@Override
	public int selectCountUser(Map map) throws Exception {
		// TODO Auto-generated method stub
		return userdao.selectCountUser(map);
	}

	@Override
	public boolean selectUserIsexists(User user) throws Exception {
		// TODO Auto-generated method stub
		return userdao.selectUserIsexists(user);
	}

	@Override
	public User select_user_by_login_name(User user) throws Exception {
		// TODO Auto-generated method stub
		return userdao.select_user_by_login_name(user);
	}

	@Override
	public boolean insert_dept_emp(HashMap map) throws Exception {
		// TODO Auto-generated method stub
		return userdao.insert_dept_emp(map);
	}

	@Override
	public int select_deptId_by_UserId(int user_id) throws Exception {
		// TODO Auto-generated method stub
		return userdao.select_deptId_by_UserId(user_id);
	}

	@Override
	public boolean detele_user_by_userid(User user) throws Exception {
		// TODO Auto-generated method stub
		return userdao.detele_user_by_userid(user);
	}

	@Override
	public boolean delete_dept_emp_by_userid(User user) throws Exception {
		// TODO Auto-generated method stub
		return userdao.delete_dept_emp_by_userid(user);
	}

	@Override
	public User selectManager_byuserId(User user) throws Exception {
		// TODO Auto-generated method stub
		return userdao.selectManager_byuserId(user);
	}
	
}
